*** Settings ***
Resource          newresource.txt

*** Test Cases ***
case-2-10-1
    : FOR    ${i}    IN RANGE    10
    \    LOG    i=${i}
    : FOR    ${j}    IN RANGE    1    10
    \    log    j=${j}
    : FOR    ${k}    IN RANGE    10    1    -2
    \    log    k=${k}
    : FOR    ${m}    IN    A    B    C
    \    log    m=${m}
    @{listVal}    Create List    1    2    F
    : FOR    ${n}    IN    @{listVal}
    \    log    n=${n}
    : FOR    ${i}    IN RANGE    3
    \    log    i=${i}
    \    ForJ    ${i}
    ForJ    ${i}

case-2-10-2
    ${a}    Set Variable    0
    ${b}    Set Variable    5
    #多行写法
    Run Keyword If    ${a}>=1    log    1
    ...    ELSE IF    ${b}<=4    log    2
    ...    ELSE IF    ${b}<=7    log    5
    ...    ELSE    log    3
    Run Keyword If    ${a}>=1    No Operaton
    ...    ELSE    log    6

case-2-10-3
    : FOR    ${i}    IN RANGE    10
    \    log    i=${i}
    \    Run Keyword If    ${i}>=7    Exit For Loop
    : FOR    ${i}    IN RANGE    10
    \    log    i=${i}
    \    Exit For Loop If    ${i}>7

*** Keywords ***
ForJ
    [Arguments]    ${arg1}
    :FOR-=${}    ${j}    IN RANGE    2
    \    log    arg=${arg1};j=${j}
